#ifndef MD_DTV_H
#define MD_DTV_H

#include <QWidget>
#include <QMessageBox>
#include "tcl_mstar_dtv_tv.h"
#include "tcl_mtk_dtv_tv.h"

namespace Ui {
class Md_dtv;
}

class Md_dtv : public QWidget
{
    Q_OBJECT
    
public:
    explicit Md_dtv(QWidget *parent = 0);
    Md_dtv(TCL_MSTAR_DTV_TV *,QList<uint>*,QMap<uint,uchar>*,QMap<uint,uchar> *,QWidget *parent=0);
    Md_dtv(TCL_MSTAR_DTV_TV *, QMap<uint ,uchar> *,QMap<uint,uchar> *, QWidget *parent=0);
    Md_dtv(TCL_MTK_DTV_TV *,QList<uint>*,QMap<uint,uchar>*,QMap<uint,uchar>*,QWidget *parent=0);
    Md_dtv(TCL_MTK_DTV_TV *, QMap<uint,uchar> *,QMap<uint,uchar>*,QWidget *parent=0);
    ~Md_dtv();

    bool is_close();
    int Check_Num(uint);

private:
    Ui::Md_dtv *ui;
    QList <QString> ch_data;
    void My_Init();

    TCL_MSTAR_DTV_TV *ms_dtv;
    TCL_MTK_DTV_TV *mt_dtv;
    int solution;
    QList<uint> *atv_num;
    QMap<uint,uchar> *dtv_air_num;
    QMap<uint,uchar> *dtv_cable_num;
    uint ch_val;
    uchar ch_type;
    ushort ch_class;
    QList<uint>md_item;
    QString name;


signals:
      void Mstar_Close(TCL_MSTAR_DTV_TV,QList<uint> );
      void Mtk_Close(TCL_MTK_DTV_TV,QList<uint> );

public slots:
       void Confirm();
      // void Set_Class_Index(int index);
       void Set_Fav_Index(int index);
       void Set_Skip_Index(int index);
      // void Set_Type_Index(int index);
       void Check_Num();
       void Check_Freq();
       void Set_Name(QString);
       void Set_Num(QString);
       void Set_Freq(QString);
};

#endif // MD_DTV_H
